<template>
	<div class="appManger" style="height: 90%;">
		<labellist v-if="type==1"></labellist>
		<labelform v-else :formList="formList"></labelform>
	</div>
</template>

<script>
	import labellist from "./list.vue";
	import labelform from "./form.vue";
	import {
		getCurrentInstance
	} from "vue";
	export default {
		components: {
			labellist,
			labelform
		},
		setup() {
			const {
				proxy,
				ctx
			} = getCurrentInstance();
			proxy.$mitt.on("changetype", (label) => {
				proxy.type = label.type;
				proxy.formList = label.type == 2 ? {
					type: label.formType,
					id: label.id || null
				} : {}
			});
		},
		mounted() {

		},
		/**
		 * 定义变量
		 */
		data() {
			return {
				name: "homePage",
				type: 1, //1 显示列表、2显示form
				formList: {}
			};
		},
	}
</script>

<style lang="appManger">
	
</style>
